import requsest from '@/utils/request'
import {MessageBox} from "element-ui";

export const nopwdLogin1=(phone)=>{
    return requsest({
        method:"POST",
        url:"http://localhost:8080/user/login",
        data:phone
    }).then(
          response=>{
              if(response.data.success){
                //  this.$store.commit("SHOW",false);
                console.log(response.data);
        
                  localStorage.setItem('token',response.data.data.token)
                  localStorage.setItem('nickname',response.data.data.nickname)
                  localStorage.setItem('avatar',response.data.data.avatar)
                   return true;
                
                 
              }
          },
          error=>{
            console.log("请求失败"+error.message);
          }

        )
}
